package org.phoenixframework.common.entity.annotation;

import io.swagger.annotations.ApiModelProperty;
import org.phoenixframework.common.entity.enums.BusinessType;

import java.lang.annotation.*;

/**
 * Created by IntelliJ IDEA.
 *
 * @author doublelifeke
 * Email: hautxxxyzjk@163.com
 * DateTime: 2021/7/6 17:30
 * Description:
 */
@Target({ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface OperationLog {

    @ApiModelProperty("模块标题")
    String title() default "";

    @ApiModelProperty("业务类型")
    BusinessType businessType() default BusinessType.OTHER;

    @ApiModelProperty("是否保存请求的参数")
    boolean saveRequestParams() default true;

    @ApiModelProperty("是否把日志输出到elk中")
    boolean elkEnable() default false;

    @ApiModelProperty("是否把日志保存到数据库中")
    boolean saveDataSource() default false;
}
